package com.luhuiguo.gwt.mvp.dispatcher.shared.exception;

import com.luhuiguo.gwt.mvp.dispatcher.shared.rpc.Action;
import com.luhuiguo.gwt.mvp.dispatcher.shared.rpc.Result;

/**
 * 
 * @author LuHuiguo
 * @version $Id: UnsupportedActionException.java 11 2009-12-26 13:39:17Z luhuiguo $
 */
public class UnsupportedActionException extends ActionException {

    private static final long serialVersionUID = -5793331354673919222L;

    public UnsupportedActionException() {
        super();
    }

    @SuppressWarnings("unchecked")
    public UnsupportedActionException( Action<? extends Result> action ) {
        this( ( Class<? extends Action<? extends Result>> ) action.getClass() );
    }

    public UnsupportedActionException( Class<? extends Action<? extends Result>> actionClass ) {
        super( "No handler is registered for " + actionClass.getName() );
    }


}
